<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="../../common.jsp"%>

<%@page import="framework.core.Conditions"%>
<%@page import="framework.core.DBConnection"%>
<%@page import="framework.core.ObjectList"%>
<%@page import="system.base.ProductTypeManager"%>
<%@page import="system.data.ProductTypeManagerBase" %>
<html>
<head>
<%String type=(String)request.getAttribute("type"); %>

<%if("0".equals(type)){ %>
<title>产品关闭信息批量导入</title>
<%}else {%>
<title>产品启用信息批量导入</title>
<%} %>
<META http-equiv=Content-Type content="text/html; charset=UTF-8">
<LINK href="<%=root%>/css/caigouxitong.css" type=text/css rel=stylesheet>

<%

%>
<script language="JavaScript">
       
        function doUploadProductBaseFile(actionObj) 
        {
            if(actionObj.parentElement.children(0).value == "") 
            {
                alert("请选择需要导入的文件。");
                return false;
            }
    
            document.form1.action="<%=response.encodeURL(root+"/A190009.do?type="+type)%>";
            form1.submit();
        }
         function checkFile(obj){
          var oExten = obj.value.replace(/^.*\.([^\.]*)$/, '$1').toLowerCase();
          if(oExten != 'xls'&&oExten != 'XLS'){
             obj.outerHTML = obj.outerHTML;
             alert("请确认导入文件为Excel文件");
          }
        }
</script>
</head>
<body BGCOLOR="#f2f2f2" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<br>

<form name="form1" method="post" enctype="multipart/form-data">
<input type='hidden' name='submittype' value=''>
<table width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
    <tr> 
        <td> 
        <table class=bg_table id=tableId    cellspacing=1 cellpadding=0 style="padding-left:5;padding-right:5" width=100% align=center border=0>
                <tr class="bg_column" height=25> 
                        <td align="left">
                        <%if("0".equals(type)){ %>
                        	批量导入产品关闭信息(Excel文件路径)：                      
                        <%}else {%>
                         	批量导入产品启用信息(Excel文件路径)：                      
                        <%} %>
                        
                          <input type='file'  class="kuang"  id='excelfile' size='50' name='excelfile' onchange="checkFile(this);">
                          <input type='button' class="kuang" id='importExcel'  name='importExcel' value='导入..' onclick="doUploadProductBaseFile(this);return false;">
          
                   <%if("0".equals(type)){ %>
                      <input type='button' class="kuang"
                    name='manufacturedown' value='下载产品关闭信息导入模板'
                    onclick="downmanufacture();"> 
                        <%}else {%>
                      <input type='button' class="kuang"
                    name='manufacturedown' value='下载产品启用信息导入模板'
                    onclick="downmanufacture();">                  
                        <%} %>
                
                        
                        </td>
                </tr>
            </table>
</td>
</tr>
</table>
</form>
    <p align="center"> 
        <input type="button"  width="58" height="24" class="kuang" onclick="javascript:window.close();" value="关闭"/>
    </p>
    <script type="text/javascript">
    
        function downmanufacture(){
            window.document.location.href="<%=response.encodeURL(root+"/jsp/sysmaintain/productUpdateIsbuyDown.jsp?type="+type)%>";   
        }
    </script>
</body>
</html>